home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST3-2.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  534b  |  22 lines

  1. ;
  2. ; *** Listing 3-2 ***
  3. ;
  4. ; Times speed of memory access to normal system
  5. ; memory.
  6. ;
  7.     mov    ax,ds
  8.     mov    es,ax        ;move to & from same segment
  9.     sub    si,si        ;move to & from same offset
  10.     mov    di,si
  11.     mov    cx,800h        ;move 2K words
  12.     cld
  13.     call    ZTimerOn
  14.     rep    movsw        ;simply read each of the first
  15.                 ; 2K words of the destination segment,
  16.                 ; writing each byte immediately back
  17.                 ; to the same address. No memory
  18.                 ; locations are actually altered; this
  19.                 ; is just to measure memory access
  20.                 ; times
  21.     call    ZTimerOff
  22.